﻿using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Security.Policy;
using System.Web;
using System.Web.Routing;
using System.Xml;

namespace DealKhuyenMaiV2.com.Helpers
{
    public class XMLHelper
    {
        private String xmlPath = "~/Info.xml";
        public String LoadLogoLink()
        {
            try
            {
                XmlDocument xml = new XmlDocument();
                String path = HttpContext.Current.Server.MapPath(xmlPath);

                xml.LoadXml(path);
                XmlNode xnList = xml.SelectSingleNode("/root/logo");
                if(xnList != null)
                {
                    if (xnList.Attributes != null) return xnList.Attributes["link"].Value;
                }
            }
            catch (Exception)
            {
                
                return "";
            }
            return "";
        }

    }
}